function [new_x,new_y, new_yaw]= PointRotate(x,y,yaw,offset)
% % 
% % yaw:rad,[0 pi]、[0 -pi];

% % offset:deg,[0 pi]、[0 -pi];
% %      left offset-----PostiveValue
% %      right offset----NegtiveValue
x=single(x);
y=single(y);
yaw=single(yaw);
offset=single(offset);
point_rad=single(0);

new_yaw=yaw + deg2rad(offset);
if new_yaw >pi
    new_yaw = -pi + (new_yaw-pi);
elseif new_yaw < -pi
    new_yaw= pi - (-(new_yaw+pi));
else
end


Dst2Origin=(x^2+y^2)^0.5;
point_rad__=single(0);
if abs(x)<0.0001 && abs(y)<0.0001
    new_x=x;
    new_y=y;
else
    if abs(x)<0.0001 && y>0
        point_rad__=single(pi/2);
    elseif abs(x)<0.0001 && y<0
        point_rad__=single(-pi/2);
    elseif abs(y)<0.0001 && x<0
        point_rad__=single(pi);
    elseif abs(y)<0.0001 && x>0
        point_rad__=single(0);
    else
        point_rad__=atan(y/x);
        if x>0.0001
            point_rad__=point_rad__;
        elseif x<-0.0001 &&y>0.0001
            point_rad__=point_rad__+pi;
        else
            point_rad__=point_rad__-pi;
        end
    end
    point_rad_=point_rad__+deg2rad(offset);


    
if point_rad_>pi
    point_rad = point_rad_ - 2*pi;
elseif point_rad_ < -pi
    point_rad = point_rad_ + 2*pi;
else
    point_rad=point_rad_;
end

    new_x= Dst2Origin * cos(point_rad);
    new_y= Dst2Origin * sin(point_rad);
end
end